package com.iisigroup.scan.folder.internal;

import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
 

public class UserFolderFactory {
    /** The Constant logger. */
    private static final Logger LOGGER = LoggerFactory
            .getLogger(UserFolderFactory.class);
     

    public  Map<String, UserProjProfile> getUserProjProfileMap() {
            final Map<String, UserProjProfile> result = new HashMap<String, UserProjProfile>();
            final InputStream is = getClass().getResourceAsStream("UserProjProfile.csv");
            
            try {
                final  List<String> lines = IOUtils.readLines(is);
                for(final String line : lines){
                    final String[] StringArray = StringUtils.splitPreserveAllTokens(line, ",");
                    
                }
            } catch (IOException e) {
                LOGGER.error(e.getMessage() ,e );
            }finally{
                try {
                    is.close();
                } catch (IOException e) {
                    LOGGER.error(e.getMessage() ,e );
                }
            }
            
            return result;
        }

}
